<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>复合选择器</title>
    <style>
        div,p,h3,spon {
            color: green;
        }
        div p spon{color: pink;}
        p.fs {
            font-style: italic;
        }
    </style>
</head>
<body>
    <div>我是div</div>
    <div>我是div<p>内部的p<spon>我是span</spon></p></div>
    <div>我是div<p>内部的p<spon>我是span</spon></p></div>
   <p class="fs">我是p<spon>我是spon</spon></p>
    <p>我是p<spon>我是spon</spon></p>
    <h3>我是h3</h3>
</body>

</html>